// 服务层 server 集中所有的接口
import { post , get } from "./ajax";

export const http ={

    // 注册
    register:body=>post('/vue/signup',body),

    // 登录
    login:body=>post('/vue/login',body),

    // 验证码
    sendcaptcha:params=>get('/vue/sendcaptcha',params),

    // 验证验证码
    getcaptcha:params=>get('/vue/getcaptcha',params),

    // 获取个人信息
    getuserinfo:params=>get('/vue/getuserinfo',params),

    // 上传头像
    sendAvatar:body=>post('/vue/send-avatar',body),

    // 获取数据
    getCity:(params,headers)=>get('/gataway?k=7031657',params,headers),

    // 卖座数据
    getmaizuodata:(params,headers)=>get('/vue/getmaizuodata',params,headers),

    // postmaizuodata:(body,headers)=>post('/vue/postmaizuodata',body,headers),
    postmaizuodata:(body,headers)=>post("/vue/postmaizuodata",body,headers),
}
